function main_color() {
    let _this=this;
    _this.base_color=["rgba(0,0,0,0)","#000000","#8e8e8e","#ffffff"];
    _this.dom=null;
    _this.now_select="";
    _this.color_dct={
        "明亮": ["#4992ff","#7cffb2","#fdd360","#ff6e76","#58d9f9","#05c091"],
        "暗淡": ["#5470c6","#91cc75","#fac858","#ee6666","#73c0de","#3ba272"],
        "马卡龙": ["#2ec7c9","#b6a2de","#5aa1ef","#ffb980","#d87a80","#8d98b3"],
        "蓝绿": ["#3fb1e3","#6beec1","#626c91","#a0a7e6","#c4ebad","#96dee8"],
        "深紫": ["#9b8bba","#e098c7","#8fd3e8","#71669e","#cc70af","#7cb4cc"],
        "复古": ["#d87c7c","#919e8b","#d7ab82","#6e7074","#61a0a8","#efa18d"],
        "粉青": ["#fc97af","#87f7cf","#f7f494","#72ccff","#f7c5a0","#d4a4eb"],
        "灰粉": ["#516b91","#59c4e6","#edafb2","#93b7e3","#a5e7f0","#cbb0e3"],
        "青草": ["#4ea397","#22c3aa","#7bd9a5","#d0648a","#f58db2","#f2b3c9"],
        "橘红": ["#893448","#d95850","#eb8146","#ffb248","#f2d643","#ebdba4"],
        "深色": ["#c12e34","#e6b600","#0098d9","#2b821d","#005ea6","#339ca8"],
        "罗马红": ["#e01f54","#5e4ea5","#f5e8c8","#b8d2c7","#c6b38e","#a4d8c2"]
    };
    _this.now_name=0;
    _this.reset=function(){
        _this.names=Object.keys(_this.color_dct);
    }
    _this.reset();
    _this.add_color=function(obj){
        for(let k in obj){
            _this.color_dct[k]=obj[k];
        }
        _this.reset();
    };
    _this.change_color=function(name){
        _this.now_name=_this.names.indexOf(name);
        let i=0;
        let styles="";
        for (let j=0;j<_this.base_color.length;j++,i++){
            styles=styles+`--color${i}-main_color:${_this.base_color[j]};`
        }
        for (let j=0;j<_this.color_dct[name].length;j++,i++){
            styles=styles+`--color${i}-main_color:${_this.color_dct[name][j]};`
        }
        styles=":root{"+styles+"}";
        _this.dom.textContent = styles;
    };
    _this.change_next=function(){
        _this.now_name++;
        if(_this.now_name>(_this.names.length-1)){_this.now_name=0}
        _this.change_color(_this.names[_this.now_name]);
    }
    // 检查是否已经存在ID为main_color的<style>标签
    let dom = document.getElementById('__ea__base_color_id');
    
    if (!dom) {
        // 如果不存在，则创建一个新的<style>标签并添加到<head>中
        _this.dom = document.createElement('style');
        _this.dom.id = 'main_color';
        _this.dom.type = 'text/css';
        document.head.appendChild(_this.dom);
        _this.change_color(_this.names[_this.now_name]);
    }
    
    // 可以在这里添加其他实例方法或属性
}
window.main_color_obj=new main_color();
// window.main_color_obj.change_color("罗马红");
// window.main_color_obj.change_next();